package com.zdb.personal.controller;


import com.zdb.personal.po.ZdbCommonCitysPo;
import com.zdb.personal.service.ZdbCommonCitysService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 城市
 */
@RestController
@RequestMapping("/citys")
public class ZdbCommonCitysController {


    @Resource
    private ZdbCommonCitysService commonCitysService;

    /**
     * 根据id查询对应的城市
     * @param id
     * @return
     */
    @RequestMapping(value = "/queryByIdCity/{id}")
    public ZdbCommonCitysPo queryByIdCity(@PathVariable("id")int id){
        return this.commonCitysService.getById(id);
    }


}
